shadow: Don't crash xen if hvm_read() from paged or shared memory
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 26 Mar 2010 08:48:08 +0000 (08:48 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 26 Mar 2010 08:48:08 +0000 (08:48 +0000)
There are two new return cases from hvm_copy_from_guest_virt() to deal
with paging or shared memory -- retry the emulation rather than
crash.

Signed-off-by: Steven Hand <steven.hand@cl.cam.ac.uk>
xen/arch/x86/mm/shadow/common.c

index 5e37bb01d4907c3f0516bd7bb4df3a2cac634831..36f92760cf9f9320f2f48c2363a65671d14862dd 100644 (file)
@@ -180,6 +180,9 @@ hvm_read(enum x86_segment seg,
     case HVMCOPY_bad_gfn_to_mfn:
     case HVMCOPY_unhandleable:
         return X86EMUL_UNHANDLEABLE;
+    case HVMCOPY_gfn_paged_out:
+    case HVMCOPY_gfn_shared:
+        return X86EMUL_RETRY;
     }
 
     BUG();